package com.moli.iov.notify.communication.template;

import com.moli.iov.notify.constants.Constant;

/**
 *
 * Concrete communication template.
 *
 * @author OAK
 * @version 3.0
 * @since 2019/10/24 11:26 AM.
 *
 */
public class ConcreteCommunicationTemplate implements CommunicationTemplate {

    private CommunicationTemplate communicationTemplate;

    private String mailSign;

    public ConcreteCommunicationTemplate(CommunicationTemplate communicationTemplate){
        this(communicationTemplate, Constant.mailSign);
    }

    public ConcreteCommunicationTemplate(CommunicationTemplate communicationTemplate, String mailSign){
        this.communicationTemplate = communicationTemplate;
        this.mailSign = mailSign;
    }

    @Override
    public String create() {
        StringBuilder builder = new StringBuilder();
        builder.append(communicationTemplate.create());
        builder.append("登录");
        builder.append(mailSign);
        builder.append("查看。");
        builder.append("<br>------------------------------------------------<br>");
        builder.append(mailSign);
        return builder.toString();
    }

}
